package cn.com.zero.manager.auth.enums;

/**
 * @author guoxin
 * @version 1.0.0
 * @Description
 * @date 2023/3/6 10:04
 */
public enum TypeEnum {

    NORMALMANAGER(1,"普通管理员"),

    SUPERMANAGER(0,"超级管理员");

    /**
     * 状态名
     */
    private int value;
    /**
     * 状态值
     */
    private String name;

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    TypeEnum(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public static String getValueByName(int value){
        switch (value){
            case 1:
                return NORMALMANAGER.getName();
            case 0:
                return SUPERMANAGER.getName();
            default:
                return null;
        }
    }
}
